package com.ruoyi.projects.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.projects.mapper.SlIntegralDetailsMapper;
import com.ruoyi.projects.domain.SlIntegralDetails;
import com.ruoyi.projects.service.ISlIntegralDetailsService;

/**
 * 会员积分明细Service业务层处理
 * 
 * @author yangz
 * @date 2024-12-01
 */
@Service
public class SlIntegralDetailsServiceImpl implements ISlIntegralDetailsService 
{
    @Autowired
    private SlIntegralDetailsMapper slIntegralDetailsMapper;

    /**
     * 查询会员积分明细
     * 
     * @param id 会员积分明细主键
     * @return 会员积分明细
     */
    @Override
    public SlIntegralDetails selectSlIntegralDetailsById(Long id)
    {
        return slIntegralDetailsMapper.selectSlIntegralDetailsById(id);
    }

    /**
     * 查询会员积分明细列表
     * 
     * @param slIntegralDetails 会员积分明细
     * @return 会员积分明细
     */
    @Override
    public List<SlIntegralDetails> selectSlIntegralDetailsList(SlIntegralDetails slIntegralDetails)
    {
        return slIntegralDetailsMapper.selectSlIntegralDetailsList(slIntegralDetails);
    }

    /**
     * 新增会员积分明细
     * 
     * @param slIntegralDetails 会员积分明细
     * @return 结果
     */
    @Override
    public int insertSlIntegralDetails(SlIntegralDetails slIntegralDetails)
    {
        slIntegralDetails.setCreateTime(DateUtils.getNowDate());
        return slIntegralDetailsMapper.insertSlIntegralDetails(slIntegralDetails);
    }

    /**
     * 修改会员积分明细
     * 
     * @param slIntegralDetails 会员积分明细
     * @return 结果
     */
    @Override
    public int updateSlIntegralDetails(SlIntegralDetails slIntegralDetails)
    {
        return slIntegralDetailsMapper.updateSlIntegralDetails(slIntegralDetails);
    }

    /**
     * 批量删除会员积分明细
     * 
     * @param ids 需要删除的会员积分明细主键
     * @return 结果
     */
    @Override
    public int deleteSlIntegralDetailsByIds(Long[] ids)
    {
        return slIntegralDetailsMapper.deleteSlIntegralDetailsByIds(ids);
    }

    /**
     * 删除会员积分明细信息
     * 
     * @param id 会员积分明细主键
     * @return 结果
     */
    @Override
    public int deleteSlIntegralDetailsById(Long id)
    {
        return slIntegralDetailsMapper.deleteSlIntegralDetailsById(id);
    }
}
